package com.yc.cloud.admin.dto.request;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.DecimalMax;
import jakarta.validation.constraints.DecimalMin;
import jakarta.validation.constraints.Size;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.Max;
import java.math.BigDecimal;

/**
 * 创建监视点请求DTO
 *
 * @author Claude Code
 * @since 2025-09-29
 */
@Data
@Schema(description = "创建监视点请求参数")
public class HwMonitoringPointCreateReqDTO {

    @Schema(description = "监视点名称", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "监视点名称不能为空")
    @Size(max = 100, message = "监视点名称长度不能超过100个字符")
    private String name;

    @Schema(description = "监视点编码", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @Size(max = 50, message = "监视点编码长度不能超过50个字符")
    private String code;

    @Schema(description = "所属区域ID", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "所属区域ID不能为空")
    private Long regionId;

    @Schema(description = "详细地址", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @Size(max = 200, message = "详细地址长度不能超过200个字符")
    private String detailedAddress;

    @Schema(description = "经度", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @DecimalMin(value = "-180.0000000", message = "经度范围必须在-180到180之间")
    @DecimalMax(value = "180.0000000", message = "经度范围必须在-180到180之间")
    private BigDecimal longitude;

    @Schema(description = "纬度", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @DecimalMin(value = "-90.0000000", message = "纬度范围必须在-90到90之间")
    @DecimalMax(value = "90.0000000", message = "纬度范围必须在-90到90之间")
    private BigDecimal latitude;

    @Schema(description = "监视点类型：1-重点区域, 2-一般区域, 3-出入口, 4-边界线", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @Min(value = 1, message = "监视点类型值范围为1-4")
    @Max(value = 4, message = "监视点类型值范围为1-4")
    private Integer pointType = 1;

    @Schema(description = "重要程度：1-高, 2-中, 3-低", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @Min(value = 1, message = "重要程度值范围为1-3")
    @Max(value = 3, message = "重要程度值范围为1-3")
    private Integer importanceLevel = 2;

    @Schema(description = "状态：1-启用, 0-禁用", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @Min(value = 0, message = "状态值只能为0或1")
    @Max(value = 1, message = "状态值只能为0或1")
    private Integer status = 1;

    @Schema(description = "描述信息", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @Size(max = 500, message = "描述信息长度不能超过500个字符")
    private String description;

    @Schema(description = "联系人", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @Size(max = 50, message = "联系人长度不能超过50个字符")
    private String contactPerson;

    @Schema(description = "联系电话", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @Size(max = 20, message = "联系电话长度不能超过20个字符")
    private String contactPhone;
}